package com.huzz.controller;

import cn.dev33.satoken.stp.SaTokenInfo;
import cn.dev33.satoken.stp.StpUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Name 名称
 * @Description 描述
 * @Author 童年的纸飞机
 * @Since 2023-08-2023/8/1 16:20
 */

@Api(tags = "系统管理")
@RestController
@RequestMapping("/api/sys")
public class LoginController {

    @ApiOperation(value = "系统登录")
    @PostMapping("/login")
    public SaTokenInfo doLogin() {
        StpUtil.login(1001);
        return StpUtil.getTokenInfo();
    }

}
